@inject('helper', 'App\Services\Helper')
<!-- 引入模板布局 -->
@extends('layouts.app')
<!-- 定义标题 -->
@section('title', '生命科学与生物科技新媒体-致力于生物医疗产业学术科研第一平台')
@section('keywords', '生物医药,生命科学,生物医疗,生物工程,生物技术,生物科研,生物学术,生物产业,医药人才,生物信息学')
@section('description', '生物岛是中国专业的生命科学门户网站和生物医药媒体平台,提供生物医药领域的资讯信息,涵盖工程技术产业科技学术科研生物信息学以及商务等,同时提供与生物产业,新药开发,生物医药行业报告,生物医药人才招聘等综合服务,致力于生命科学领域前沿生物技术和成功商业模式的传播。')

@section('content')

<div class="index_left fl">
    @include('public.mainsidebar')
</div>
<div class="index_middle fl">
    <ul id="cms_list" data-order="">
    @foreach($articles as $key => $article)
        <li data-i="0">
            <div class="img">
                <a href="/article/detail?id={{$article['id']}}" target="_blank">
                    <img src="http://cache1.bioon.com//webeditor/uploadfile/202001/20200112233326358.jpg">
                </a>
            </div>
            <div class="cntx">
                <h4><a href="route('article/detail', ['id' => {{$article['id']}}])" class="l" target="_blank">{{ $helper::msubstr($article['title'],0,30) }}</a></h4>
                <p>
                    2020年1月12日 讯 /生物谷BIOON/ --日前，一项刊登在国际杂志PNAS上题为“Altruistic behaviors relieve physical pain”的研究报告中，来自北京大学等机构的科学家们通过研究发现，相比其他...
                </p>
                <div class="fl huise">
                    2020-01-15
                    <span>

                    </span>
                </div>
            </div>
            <div class="clear"></div>
        </li>
        @endforeach
    </ul>
</div>
<div class="index_right fr">
    <div class="right_kuai">
        <script type="text/javascript" charset="utf-8" src="http://cache1.medsci.cn/aimgs/bioon_content_right_1.js"></script>

        <a href="http://meeting.bioon.com/?__token=bpc-zuixinhuiyi" target="_blank" class="ku1">最新会议</a>
        <a href="http://ent.bioon.com/training/index" class="ku2" target="_blank">培训班</a>
        <a href="http://news.bioon.com/database/journal.html" class="ku3 marnone">期刊库</a>

        <div class="new_ku_webinar clearfix">
            <span class="ku_webinar_s"><a href="http://xy.bioon.com/live/" target="_blank"><img src="http://cdn1.bioon.com/images/r_icon_webinar.jpg" alt=""> 在线课堂 Webinar</a></span>
            <div class="webinar_lisr">
                <p><a href="http://xy.bioon.com//live/webinar_play_two/470.html" target="_blank">2019干细胞系列网络研讨会-间充质干细胞技术前沿论坛</a></p>
                <p><a href="http://xy.bioon.com//live/webinar_play_new/468.html" target="_blank">高效上游细胞培养工艺发展趋势</a></p>
                <p><a href="http://xy.bioon.com//live/webinar_play_new/469.html" target="_blank">安捷伦基因组学系列讲座 —— 超长片段 DNA 样本分离与质控的终极解决方案</a></p>
            </div>
        </div>
        <style type="text/css">
            .new_ku_webinar {
                width: 100% !important;
                display: block;
                margin-bottom: 8px;
                height: 110px !important;
                line-height: 18px;
                font-size: 14px;
                text-align: left;
                color: white;
                background: #6d93c3;
            }

            .ku_webinar_s {
                width: 20%;
                display: inline-block;
                float: left;
                margin-right: 18px;
            }

            .ku_webinar_s>a {
                padding: 0;
                margin: 0;
                display: block;
            }

            .ku_webinar_s>a>img {
                display: inline-block;
                width: 80%;
            }

            .webinar_lisr {
                width: 70%;
                margin-left: 3%;
                display: block;
                float: left;
                text-align: left !important;
                padding-top: 15px;
            }

            .webinar_lisr p a {
                width: 100%;
                padding: 0;
                margin-top: 5px;
                line-height: 28px;
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
                height: 28px;
                font-weight: normal;
                margin: 0;
                font-size: 12px;
                text-align: left;
            }
        </style>
        <div class="clear"></div>
    </div>
</div>
<!--@end san lan -->
<div class="banner rounded">
    <div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
        <div class="carousel-inner">
            @banners($banner,'IndexBanner')
            <a href="{{$banner['url']}}">
                <div class="carousel-item active">
                    <img class="d-block w-100" src="{{ $helper::getPicture($banner['cover_id']) }}" alt="First slide">
                </div>
            </a>
            @endbanners
        </div>
        <a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
            <span class="carousel-control-prev-icon" aria-hidden="true"></span>
            <span class="sr-only">上一个</span>
        </a>
        <a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
            <span class="carousel-control-next-icon" aria-hidden="true"></span>
            <span class="sr-only">下一个</span>
        </a>
    </div>
</div>



<div class="row mb-2">
    @articles($article,'default',2,0,1)
    <div class="col-md-6">
        <div class="row no-gutters border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative">
            <div class="col p-4 d-flex flex-column position-static">
                <strong class="d-inline-block mb-2 text-primary">{{ $helper::getCategory($article['category_id']) }}</strong>
                <h3 class="mb-0">{{ $helper::msubstr($article['title'],0,30) }}</h3>
                <div class="mb-1 text-muted">
                    {{date('Y-m-d',strtotime($article['created_at']))}}
                </div>
                <p class="card-text mb-auto">{{ $helper::msubstr($article['description'],0,50) }}</p>
                <a href="/article/detail?id={{$article['id']}}" class="stretched-link">查看更多</a>
            </div>
            <div class="col-auto d-none d-lg-block">
                <img class="bd-placeholder-img" width="200" height="246" src="{{ $helper::getPicture($article['cover_id']) }}" alt="First slide">
            </div>
        </div>
    </div>
    @endarticles
</div>
<main role="main" class="container">
    <div class="row">
        <div class="col-md-8 blog-main">
            <h3 class="pb-4 mb-4 font-italic border-bottom"> 所有文章 </h3>
            @foreach($articles as $key => $article)
            <div class="blog-post">
                <h2 class="blog-post-title"><a href="{{route('article/detail', ['id' => $article['id']])}}">{{ $helper::msubstr($article['title'],0,30) }}</a></h2>
                <p class="blog-post-meta">{{date('Y-m-d',strtotime($article['created_at']))}}</p>
                <p>
                    {!!strip_tags($article['description'])!!}
                </p>
            </div>
            <!-- /.blog-post -->
            @endforeach
            <nav class="blog-pagination">
                @if($category)
                {{ $articles->appends(['name'=>$category->name])->links() }}
                @else
                {{ $articles->links() }}
                @endif
            </nav>
        </div>
        <!-- /.blog-main -->
        <aside class="col-md-4 blog-sidebar">
            <div class="p-4 mb-3 bg-light rounded">
                <h4 class="font-italic">关于我们</h4>
                <p class="mb-0">
                    @page($page,'aboutus')
                    {!!strip_tags($page['content'])!!}
                    @endpage
                </p>
            </div>
            <div class="p-4">
                <h4 class="font-italic">文章归档</h4>
                <ol class="list-unstyled mb-0">
                    @archives($archive,'posts')
                    <li><a href="#">{{$archive['created_date']}}</a></li>
                    @endarchives
                </ol>
            </div>
            <div class="p-4">
                <h4 class="font-italic">友情链接</h4>
                <ol class="list-unstyled">
                    @links($link)
                    <li><a href="{{$link['url']}}">{{$link['title']}}</a></li>
                    @endlinks
                </ol>
            </div>
        </aside>
        <!-- /.blog-sidebar -->
    </div>
    <!-- /.row -->
</main>
<!-- /.container -->
@endsection

<!-- 自定义脚本 -->
@section('script')
<script>
</script>
@endsection